<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script>
    $.getJSON("data.json", function (data){
      alert(data.length);
    }); 
</script>